home *** CD-ROM | disk | FTP | other *** search
- unit SimpMain;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- Menus, PSetting, StdCtrls, ExtCtrls;
-
- type
- TfrmMain = class(TForm)
- frmsMain: TPFormSettings;
- MainMenu1: TMainMenu;
- mniFile: TMenuItem;
- mniFileExit: TMenuItem;
- mniHelp: TMenuItem;
- mniHelpAbout: TMenuItem;
- edtStud: TEdit;
- cbxQuestion: TCheckBox;
- ListBox1: TListBox;
- RadioGroup1: TRadioGroup;
- Label1: TLabel;
- Button1: TButton;
- dlgFont: TFontDialog;
- procedure mniFileExitClick(Sender: TObject);
- procedure mniHelpAboutClick(Sender: TObject);
- procedure Button1Click(Sender: TObject);
- procedure ListBox1Click(Sender: TObject);
- procedure FormShow(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- frmMain: TfrmMain;
-
- implementation
-
- uses About;
-
- {$R *.DFM}
-
- procedure TfrmMain.mniFileExitClick(Sender: TObject);
- begin
- Close;
- end;
-
- procedure TfrmMain.mniHelpAboutClick(Sender: TObject);
- begin
- frmAbout.ShowModal;
- end;
-
- procedure TfrmMain.Button1Click(Sender: TObject);
- begin
- dlgFont.Font.Assign( Label1.Font );
- if ( dlgFont.Execute = TRUE ) then
- begin
- Label1.Font.Assign( dlgFont.Font );
- end;
- end;
-
- procedure TfrmMain.ListBox1Click(Sender: TObject);
- begin
- frmsMain['List_Item_Index'].AsInteger := Listbox1.ItemIndex;
- end;
-
- procedure TfrmMain.FormShow(Sender: TObject);
- begin
- Listbox1.ItemIndex := frmsMain['List_Item_Index'].AsInteger;
- end;
-
- end.
-